{include app:admin.inc.header}

{include app:admin.inc.top}

<div class="container-fluid content-body">
	<div class="main">
		{include app:admin.inc.menu}

		<section class="right-section" id="right-section">
			<!-- start of inner-frame -->
			<div class="inner-iframe">
				<ul class="breadcrumb">
					<li>
						<i class="glyphicon glyphicon-home"></i>
						<span>当前位置：</span>
						<a href="#">频道</a>
						<i class="glyphicon glyphicon-chevron-right"></i>
						<a href="#">添加</a>
					</li>
				</ul>

				<!-- Nav tabs -->
				<ul class="nav nav-tabs">
					<li><a href="/admin/index/"><i class="glyphicon glyphicon-plus"></i> 添加用户</a></li>
					<li><a href="/admin/index/clist"><i class="glyphicon glyphicon-th-list"></i> 用户列表</a></li>
					<li class="active"><a href="/admin/index/edit"><i class="glyphicon glyphicon-edit"></i> 编辑用户</a></li>
				</ul>

				<div class="inner-container">

					<form role="form" class="content-add-form" id="content-add-form" autocomplete="off">
						<div class="form-group">
							<label>频道名称</label>
							<input type="text" class="form-control" name="data[name]"  max-length="20" min-length="3" placeholder="频道名称" required />
						</div>
						<p class="help-block"></p>


						<div class="form-group">
							<label>父频道</label>
							<select class="form-control" name="data[pid]">
								<option value="0">根目录</option>
                                                                {loop $channels $key $val}
                                                                {if $val['pid'] == 0}
								<option value="{$val['id']}">{$val['name']}</option>
                                                                   {if $channels[$key]['sub'] }
                                                                       {loop $channels[$key]['sub'] $k $v}
								       <option value="{$v['id']}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$v['name']}</option>
                                                                       {/loop}
                                                                   {/if}
                                                                {/if}
                                                                {/loop}
							</select>
						</div>
						<p class="help-block text-error"></p>


						<div class="btn-group btn-group-or">
							<a href="/admin/channel/insert" class="btn btn-primary ajaxproxy"
							   proxy='{"method":"post", "location":"/admin/channel/index"}'>提交保存</a>
							<span class="or">OR</span>
							<button type="reset" class="btn btn-default">重置表单</button>
						</div>
					</form>

				</div>
			</div><!-- end of inner -->

		</section>

	</div>
</div>

{include app:admin.inc.footer}

<script>
	seajs.use("user", function(exports) {
	});
</script>
</body>
</html>
